package com.wpre.lotterysystem.controller.param;

import jakarta.validation.Valid;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotEmpty;
import lombok.Data;
import jakarta.validation.constraints.NotNull;
import org.springframework.validation.annotation.Validated;

import java.util.Date;
import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: LianBao
 * Date: 2024-12-22
 * Time: 19:51
 */
@Data
public class DrawPrizeParam {

    @NotNull(message = "活动id不能为空")
    private Long activityId;//活动id
    @NotNull(message = "奖品id不能为空")
    private Long prizeId;//奖品id
    @NotBlank(message = "奖品等级不能为空")
    private String prizeTiers;//奖品等级
    @NotNull(message = "中奖时间不能为空")
    private Date winningTime;//中奖时间

    @NotEmpty(message = "中奖人员列表不能为空")
    @Valid
    private List<Winner> winnerList;//中奖人员列表


    //中奖者
    @Data
    public static class Winner {
        @NotNull(message = "中奖者id不能为空")
        private Long userId;//中奖者id
        @NotBlank(message = "中奖者姓名不能为空")
        private String userName;//中奖者姓名

    }


}
